package com.cashmama.market.api.application.controller.user.response;

import com.cashmama.market.api.domain.vo.user.UserRegisterVO;
import com.cashmama.market.api.infras.handler.ResponseData;

/**
 * @program: market-api
 * @description
 * @author: frank
 * @create: 2019-12-23 10:47
 **/
public class UserLoginResponse implements ResponseData {
    /**
     * 用户令牌
     */
    private String token;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 用户code
     */
    private String userCode;

    /**
     * 是否需要短信分析
     */
    private Boolean jumpSmsReport = Boolean.FALSE;

    private Boolean newUser = Boolean.FALSE;

    private Boolean newRegister = Boolean.FALSE;

    public UserLoginResponse(UserRegisterVO userRegisterVO, Boolean jumpSmsReport) {
        this.token = userRegisterVO.getToken();
        this.mobile = userRegisterVO.getMobile();
        this.userCode = userRegisterVO.getUserCode();
        this.newUser = userRegisterVO.isNewRegister();
        this.jumpSmsReport = jumpSmsReport;
        this.newRegister = userRegisterVO.isNewRegister();
    }

    public UserLoginResponse(UserRegisterVO userRegisterVO) {
        this.token = userRegisterVO.getToken();
        this.mobile = userRegisterVO.getMobile();
        this.userCode = userRegisterVO.getUserCode();
        this.newUser = userRegisterVO.isNewRegister();
    }

    public Boolean getNewUser() {
        return newUser;
    }

    public UserLoginResponse setNewUser(Boolean newUser) {
        this.newUser = newUser;
        return this;
    }

    public Boolean getJumpSmsReport() {
        return jumpSmsReport;
    }

    public UserLoginResponse setJumpSmsReport(Boolean jumpSmsReport) {
        this.jumpSmsReport = jumpSmsReport;
        return this;
    }

    public String getToken() {
        return token;
    }

    public UserLoginResponse setToken(String token) {
        this.token = token;
        return this;
    }

    public String getMobile() {
        return mobile;
    }

    public UserLoginResponse setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public UserLoginResponse setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public Boolean getNewRegister() {
        return newRegister;
    }

    public UserLoginResponse setNewRegister(Boolean newRegister) {
        this.newRegister = newRegister;
        return this;
    }
}
